﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using Meqs.Entity;
using Meqs.Entity.Views;

namespace Meqs.Logic.Interface
{
    public interface IStudentEvalsLogic : IMultiCommonLogic<StudentEvals, int>
    {
        ArrayList FindStudentEvalInfo(String schoolMark, int schoolYear, int id);
        ArrayList FindStudentEvalInfo(String schoolMark, int schoolYear, int id, int evalType);

        /// <summary>
        /// 添加评估活动
        /// </summary>
        int CreateEval(StudentEvals template, String schoolMark);

        /// <summary>
        /// 更新评估活动
        /// </summary>
        int UpdateEval(StudentEvals template, String schoolMark);

        /// <summary>
        /// 获取有评价的学年
        /// </summary>
        ArrayList FindSchoolYears(String schoolMark);
        ArrayList FindSchoolYears(String schoolMark, int evalType);

        /// <summary>
        /// 删除学生评价
        /// </summary>
        int DeleteEval(int id, String schoolMark);

        /// <summary>
        /// 打开一个学生评价
        /// </summary>
        int OpenEval(int id, String schoolMark, IList<int> causeList, int templateId);

        /// <summary>
        /// 关闭一个学生评价
        /// </summary>
        int CloseEval(int id, String schoolMark);

        /// <summary>
        /// 根据登陆的学生ID，获取当前的评价活动
        /// </summary>
        /// <param name="studentID"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        StudentEvals FindeCurrentStudentEval(int studentID, string schoolMark);

        /// <summary>
        /// 根据制定的学生评教活动ID及学生ID，查询学生评价的教师
        /// </summary>
        /// <param name="currentStudentEval"></param>
        /// <param name="studentID"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        IList<TeacherInfoExtendCauseInfo> FindStudentEvalsTeacherList(StudentEvals currentStudentEval, int studentID, string schoolMark);

        /// <summary>
        /// 查询教师是否已经被评
        /// </summary>
        /// <param name="currentStudentEval"></param>
        /// <param name="teacherID"></param>
        /// <param name="studentID"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        bool TeacherPartObjState(StudentEvals currentStudentEval, int teacherID, int studentID, string schoolMark);

        /// <summary>
        /// 查询SheetItems
        /// </summary>
        /// <param name="currentStudentEval"></param>
        /// <param name="teacherID"></param>
        /// <param name="studentID"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        SheetItems FindTeacherSheetItems(StudentEvals currentStudentEval, int teacherID, int studentID, string schoolMark);

        /// <summary>
        /// 查询SheetItems
        /// </summary>
        /// <param name="seID"></param>
        /// <param name="studentID"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        QualitySheetItems FindStudentEvalSheetItems(int seID, int studentID, string schoolMark);

        /// <summary>
        /// 判断该学生是否已经评完
        /// </summary>
        /// <param name="currentStudentEval"></param>
        /// <param name="studentID"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        bool CheckAllTeacherState(StudentEvals currentStudentEval, int studentID, string schoolMark);

        /// <summary>
        /// 判断该学生是否已经评完
        /// </summary>
        /// <param name="studentID"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        bool CheckAllTeacherState(int studentID, string schoolMark);

        /// <summary>
        /// 更新指定学生评教活动的脏数据
        /// </summary>
        bool UpdateDirtyData(int seId, String schoolMark);

        /// <summary>
        /// 获取指定学生评教活动的状态
        /// </summary>
        IList<StudentEvalState> GetStudentEvalState(int seId, String schoolMark, String causeList);

        /// <summary>
        /// 获取学生评教
        /// </summary>
        /// <param name="studentID"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        IList<StudentEvals> GetStudentEvalByStudent(int studentID, string schoolMark);

        /// <summary>
        /// 获取学生评教
        /// </summary>
        /// <param name="studentID"></param>
        /// <param name="evalType"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        IList<StudentEvals> GetStudentEvalByStudent(int studentID, EvalType evalType, string schoolMark);

        /// <summary>
        /// 获取学生评教
        /// </summary>
        /// <param name="studentID"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        IList<StudentEvals> GetStudentEvalByStudentID(int studentID, string schoolMark);

        /// <summary>
        /// 获取指定日期范围的学习品质问卷
        /// </summary>
        IList<StudentEvals> GetQualityEvals(String schoolMark, DateTime begin, DateTime end);
    }
}
